package com.xiaoma.pattern.observer1;

import java.util.Observable;
import java.util.Observer;

public class NotifyReceiver implements Observer {

    private String name;

    public NotifyReceiver(String name){
        this.name = name;
    }

    @Override
    public void update(Observable observable, Object notify) {
        System.out.println("观察者["+name+"]已监测到来自["+observable.toString()+"]的更新："+notify);
    }
}
